#!/bin/bash

CONFIG_FILE='/etc/ipset.conf'

case $1 in
  start)
    ipset restore < "$CONFIG_FILE"
  ;;
  stop)
    ipset destroy
  ;;
  save)
    ipset save > "$CONFIG_FILE"
  ;;
  *)
    echo "usage: ${0##*/} {start|stop|save}" >&2
    exit 1
  ;;
esac

# vim:set ts=2 sw=2 ft=sh et:
